<template>
      
  <div class="">
    <div class="topbox">
      <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
        <van-swipe-item v-for="item in banner" :key="item.id"
          ><img :src="item.picUrl" alt="" class="imas"
        /></van-swipe-item>
      </van-swipe>
      <ul>
        <li>
          <img src="../assets/images/icon.png" alt="" />
          <p>签到</p>
        </li>
        <li>
          <img src="../assets/images/icon.png" alt="" />
          <p>礼券</p>
        </li>
        <li>
          <img src="../assets/images/icon.png" alt="" />
          <p>砍价</p>
        </li>
        <li>
          <img src="../assets/images/icon.png" alt="" />
          <p>专栏</p>
        </li>
      </ul>
    </div>

    <bargaining></bargaining>
    <SelectedTopics></SelectedTopics>
    <PopularRecommendation></PopularRecommendation>
    <Bottoms></Bottoms>
  </div>
</template>

<script>
import { getbanner } from "../utils/api/home.js";
import bargaining from "@/components/Bargaining";
import SelectedTopics from "@/components/SelectedTopics";
import PopularRecommendation from "@/components/PopularRecommendation";
import Bottoms from "@/components/Bottoms";
export default {
  components: {
    bargaining,
    SelectedTopics,
    PopularRecommendation,
    Bottoms,
  },
  data() {
    return {
      banner: [],
    };
  },
  mounted() {
    getbanner().then((res) => {
      console.log(res);
      this.banner = res.data;
    });
    //   getlist().then((res) => {
    //     console.log(res);
    //   });
  },
  methods: {},
};
</script>

<style lang='scss' scoped>
.topbox {
  height: 7.6rem;
  position: relative;
  top: 0;
}
ul {
  box-sizing: border-box;
  border-bottom: 0.33rem solid #f5f5f5;
  background-color: #fff;
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
  align-content: center;
  border-radius: 20% 20% 0 0;
  height: 2.18rem;

  li {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    img {
      width: 0.8rem;
      height: 0.8rem;
    }
    p {
      margin-top: 0.06rem;
      font-size: 0.4rem;
    }
  }
}
.my-swipe .van-swipe-item {
  color: #fff;
  font-size: 20px;
  line-height: 150px;
  text-align: center;
  background-color: #39a9ed;
}
.imas {
  width: 7.5rem;
  height: 7.5rem;
}
.my-swipe .van-swipe-item[data-v-fae5bece] {
  line-height: 0 !important;
}
</style>
